import request from '@/utils/request';

interface fetchCommentList {
  email: string;
  password: string;
}

// 请求列表
export const fetchCommentList = (params: any) => {
  return request('/admin/comments', {
    method: 'GET',
    params,
  });
};

// 请求列表
export const fetchCommentDetails = (id: number) => {
  return request(`/admin/comments/${id}`, {
    method: 'GET',
    params: { include: 'goods,user' },
  });
};

// 评论回复
export const fetchCommentReply = (id: number, data: any) => {
  return request(`/admin/comments/${id}/reply`, {
    method: 'PATCH',
    data,
  });
};
